# .bash_aliases

#=============== v === non-confidential leilei aliases === v ===============

# colorful ls
alias ls="ls -G --color=\"always\""
alias ll="ls -l"
alias la="ls -al"

# use diffmerge for svn diff
alias svndiff="svn diff --diff-cmd ~/bin/diffmerge_svn.sh"

# use meld for svn diff, for linux
alias svndiff="svn diff --diff-cmd /usr/bin/meld"

# use diffmerge for normal diff
alias guidiff="~/bin/diffmerge_normal.sh"

# fast go to a directory
# go <app_name> [<vhost_name>]
# cd /usr/appfolio/apps/<app_name>/vhosts/<vhost_name>
go(){
    cd /usr/appfolio/apps
    if [ $1 ]; then
        if [ $1 = p ]; then
            app_name=property
        elif [ $1 = lgi ]; then
            app_name=login 
        elif [ $1 = a ]; then
            app_name=adep
        fi  
        cd $app_name
        if [ $2 ]; then
            vhost_name=$2
            cd vhosts/$2
        fi  
    fi  
}  

# put svn diff to a file
gendiff(){
    DEST=${!#}
    for ARG in $*
    do
        if [ $ARG != $DEST ]; then
            svn diff $ARG >> $BACKUP_DIR/$DEST
        fi
    done
}

#=============== ^ === non-confidential leilei aliases === ^ ===============


#=============== v === machine specified aliases go here === v ===============
# go here go here go here go here go here go here go here go here go here
#=============== ^ === machine specified aliases go here === ^ ===============

